# -*- coding: utf-8 -*-
"""
main
2025/10/8
@author: zhangzida
"""
import time

from base.base import Base

class page_add_payment(Base):
    def add_payment(self,userid,username,payment_product_number,payment_product_name,risk_pre_storage_period):
        self.switch_node("add_payment")
        self.logger.info('点击支付管理')
        self.click("zf_payment")
        time.sleep(5)
        self.logger.info('点击用户支付配置')
        self.click("op_user_payment_configuration")
        self.logger.info('添加支付配置')
        self.click("op_add_payment")
        self.logger.info('输入用户编号')
        self.send_keys("op_userid",userid)
        self.logger.info('输入用户名')
        self.send_keys("op_username", username)
        self.logger.info('输入支付产品编号')
        self.send_keys("op_payment_product_number", payment_product_number)
        self.logger.info('输入支付产品名称')
        self.send_keys("op_payment_product_name", payment_product_name)
        self.logger.info('输入风险预存期')
        self.send_keys("op_risk_pre_storage_period", risk_pre_storage_period)
        self.logger.info('点击提交')
        self.click("op_submit")
        time.sleep(5)